package com.ai.controller.task;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;


/**
 * 
 * 定时器   控制器
 * 
 * @author daizy
 *
 */
@Controller
public class TaskController {

	
	@RequestMapping("/task/intoTaskPage")
	public String intoTaskPage(){
		return "task/taskPage";
	}
	
	/*@RequestMapping("/task/findTaskInfo")
	@ResponseBody
	public Pagination<JobInfo> findTaskInfo(){
		Pagination<JobInfo> ipg= new Pagination<JobInfo>();
        List<JobInfo> jobInfos = JobManager.getJobDetails();
        ipg.setRows(jobInfos);
        ipg.setTotal(jobInfos.size());
        return ipg;
	}*/
	
	/**
	 * 暂定
	 * @param jobName
	 * @param groupName
	 * @return
	 *//*
	@RequestMapping("/task/pauseJob")
	@ResponseBody
	public Result pauseJob(String jobName,String groupName) {
        JobManager.pauseJob(jobName, groupName);
        return null;
	}
	
	*//**
	 * 继续
	 * @param jobName
	 * @param groupName
	 * @return
	 *//*
	@RequestMapping("/task/resumeJob")
	@ResponseBody
	public Result resumeJob(String jobName,String groupName) {
		 JobManager.resumeJob(jobName, groupName);
        return null;
	}
	
	*//**
	 * 执行
	 * @param jobName
	 * @param groupName
	 * @return
	 *//*
	@RequestMapping("/task/triggerJob")
	@ResponseBody
	public Result triggerJob(String jobName,String groupName) {
		JobManager.triggerJob(jobName, groupName);
        return null;
	}
	
	*//**
	 * 历史记录
	 * @return
	 *//*
	@RequestMapping("/task/history")
	public String history(String jobName,String groupName) {
        //histories = JobManager.getHistories(jobName, groupName);
        return "task/history";
    }*/
	
}
